package com.my12306.train.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.common.model.vo.PageVo;
import com.my12306.train.model.entity.RateEntity;
import com.my12306.train.model.vo.RateVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 票种的票率
 *
 * @author ËÕÄÁÏ¦
 * @email
 * @date 2020-07-24 20:58:07
 */
@Mapper
public interface RateDao extends BaseMapper<RateEntity> {

    /**
     * 批量逻辑删除，以防止真正删除后影响其他原来已有的相关数据记录
     * @param ids
     * @param value
     */
    void deleteBatchTicketRateByIds(@Param("list") List<Long> ids, @Param("logicDelete") int value);

    /**
     * 分页查询
     * @param pageVo
     * @param logicDelete
     * @return
     */
    List<RateEntity> queryTicketRateByPage(@Param("pageVo") PageVo pageVo, @Param("logicDelete") Integer logicDelete);


    /**
     * 查询总数
     * @param pageVo
     * @param logicDelete
     * @return
     */
    Integer queryTicketRateCount(@Param("pageVo") PageVo pageVo, @Param("logicDelete") Integer logicDelete);

    /**
     * 请求 所有逻辑删除
     * @param logicDelete
     * @return
     */
    List<RateVO> queryAllTicketRate(@Param("logicDelete") Integer logicDelete);
}
